/**
 * @author : Bruce
 * @date: 2024/7/23 - 07 - 23 - 21:17
 * @Description: PACKAGE_NAME
 * @version: 1.0
 */
public class CustomerThread extends Thread { //商品类
    //共享商品：
    private Product p;
    public CustomerThread(Product p) {
        this.p = p;
    }
    @Override
    public void run() {
        for (int i = 1; i <= 10 ; i++) {//i:消费次数
//                System.out.println("消费者消费了：" + p.getBrand() + "---" + p.getName());
            p.getProduct();
        }
    }
}
